package pl.prv.polanie.client.dto;

import com.google.gwt.user.client.rpc.IsSerializable;
// default package

/**
 * CalendarDayDTO entity. @author MyEclipse Persistence Tools
 */

public class CSCalendarDayDTO extends java.lang.Object implements IsSerializable, ICSDTO, Comparable<CSCalendarDayDTO> {


    // Fields    

     private long id;
     private long semesterID;
     private String dayLabel;
     private long displayOrder;
     
     /**
      * Gdy = 1, dzien jest niedziela. Jesli 0 (wartosc domyslna), to sobota lub brak znaczenia tej wartosci.
      */
     private boolean sunday;
     
     


    // Constructors

    /** default constructor */
    public CSCalendarDayDTO() {
    }

    
    /** full constructor */
    public CSCalendarDayDTO(long id, long semesterID, String dayLabel, long displayOrder, boolean sunday) {
    	this.id = id;
        this.semesterID = semesterID;
        this.dayLabel = dayLabel;
        this.displayOrder = displayOrder;
        this.sunday = sunday;
    }


	public long getId() {
		return id;
	}


	public void setId(long id) {
		this.id = id;
	}





	public long getSemesterID() {
		return semesterID;
	}


	public void setSemesterID(long semesterID) {
		this.semesterID = semesterID;
	}


	public String getDayLabel() {
		return dayLabel;
	}


	public void setDayLabel(String dayLabel) {
		this.dayLabel = dayLabel;
	}


	public long getDisplayOrder() {
		return displayOrder;
	}


	public void setDisplayOrder(long displayOrder) {
		this.displayOrder = displayOrder;
	}



	public String toString() {
		String r;
		r = dayLabel + ", order: " + displayOrder + ", semestrID: " + semesterID + ", sunday: " + sunday;
		return r;
	}
	
	public String toLabel() {
		String r = "" +
			getDayLabel();
		return r;
	}


	public boolean isSunday() {
		return sunday;
	}


	public void setSunday(boolean sunday) {
		this.sunday = sunday;
	}



	public int compareTo(CSCalendarDayDTO o) {
	    return new Long(this.displayOrder).compareTo(new Long(o.getDisplayOrder()));
	}


}